fix: respect event data when applying/merging scope data#1253
Merged
fix: respect event data when applying/merging scope data#1253
Conversation
supervacuus
reviewed
May 22, 2025
Collaborator
supervacuus
left a comment
There was a problem hiding this comment.
Thx, @jpnurmi. Since this is a breaking change (even if it fixes towards expected behavior), can you please:
- provide a changelog section that mentions this as a breaking change (in addition to the fix, but referencing the same PR)
- link that "breaking" to the docs that support this as the expected outcome
Collaborator
Author
|
I wanted to offload this from the local scope PR, but it's ok to hold this off until local scopes are ready. Even if it's the correct behavior, as far as I know, nobody has asked for this, and there's always a risk someone somewhere is relying on the wrong behavior. The breaking change will be easier to sell together with local scopes that justify the behavior change. :) |
supervacuus
approved these changes
Jun 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes the issue that when scope data is merged into events, the scope data currently takes precedence for tags, contexts, and extra data.
For example, if a scope has the following tags/contexts/extra:
{ "both": "scope", "scope-only": "scope" }And an event has the following data in the respective field:
{ "both": "event", "event-only": "event" }Expected result (event data takes precedence):
{ "both": "event", "event-only": "event", "scope-only": "scope" }Actual result (scope data takes precedence):
{ "both": "scope", "event-only": "event", "scope-only": "scope" }